Micron Document
Livres et Wikis | Archives | Info


LWJGL
layout: Wide Β· Narrow Β· Centered
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
top
The Lightweight Java Game Library (LWJGL) is an open-source software library that provides bindings to a variety of C libraries for video game developers to Java. It exposes cross-platform libraries commonly used in developing video games and multimedia titles, such as Vulkan, OpenGL, GLFW, OpenAL and OpenCL.

The primary goal of the project is to provide a way for Java developers to get access to resources that are otherwise unavailable or poorly implemented on the existing Java platform. The main philosophy is to expose underlying technology as a thin wrapper, thus creating an API close to the original. It is also the basis of many high-level Java game engines and libraries, such as libGDX or the jMonkeyEngine.

Contents

β€’ History
β€’ Bindings
β€’ Notable uses
β€’ References

──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

History

Development of the library began in 2002 with the release of J2SE 1.4, making use of the newly-added non-blocking I/O operations and off-heap memory access. These additions to the JDK allowed for better access to native memory and libraries not a part of the JDK. The first official release of the library was on 4 February 2007.cite-ref-lwjgl-1-0-1-1[1]

On 13 November 2014, version 3 was announced, which was released in the alpha version on 27 April 2015 and is a complete rewrite of LWJGL.cite-ref-welcome-to-lwjgl-3-5-0[5]cite-ref-roadmap-6-0[6]cite-ref-lwjgl-3-release-7-0[7] Many new bindings, including GLFW, EGL and Objective-C, were added.cite-ref-website-4-1[4]cite-ref-roadmap-6-1[6] Support for Oculus Rift development was also added with LibOVR bindings.cite-ref-website-4-2[4]cite-ref-lwjgl-3-release-7-1[7] The new version was released on 4 June 2016, after more than 3 and a half years in development.cite-ref-8[8]

Bindings

The library accesses native C code through the Java Native Interface (JNI). Bindings to each of the native libraries exist as different modules so developers can make custom builds with only the things they need in a certain program.cite-ref-website-4-3[4]cite-ref-lwjgl-3-release-7-2[7]cite-ref-bindings-faq-9-0[9]

While utility classes are written in pure Java, most of the binding classes are automatically generated by a custom generator implemented in Kotlin.cite-ref-github-2-2[2]cite-ref-doc-generator-3-1[3]

Since version 3.1, LWJGL is fully split into 51 modules that can be downloaded and used separately. To make this process easier, the project provides an online build configurator, which allows users to download custom combinations of modules and automatically generates Maven and Gradle configuration files to ease their use with existing projects.cite-ref-blog-3-1-0-released-10-0[10]cite-ref-11[11]

| Binding | Category | Description |
|---|---|---|
| EGL | Khronos APIs | Interface between Khronos rendering API… |
| OpenCL | Khronos APIs | API for cross-platform parallel computi… |
| OpenGL | Khronos APIs | 3D graphics specification implemented b… |
| OpenGL ES | Khronos APIs | OpenGL for embedded systems like mobile… |
| Vulkan | Khronos APIs | Upcoming cross-platform 3D graphics API. |
| GLFW | Display and Input | Window management library needed for ha… |
| JAWT | Display and Input | AWT native interface. |
| nfd | Display and Input | Small cross-platform native file dialog… |
| tinyfd | Display and Input | Small native dialog library. |
| OpenAL | Audio | Three-dimensional audio API. |
| Opus | Audio | Open, royalty-free audio codec . |
| Assimp | Graphics | Portable open source library to import… |
| bgfx | Graphics | Cross-platform rendering library suppor… |
| DriftFX | Graphics | Library to render OpenGL content into J… |
| LibOVR | Graphics | API of the Oculus Rift SDK. |
| meshoptimizer | Graphics | A mesh optimization library that makes… |
| NanoSVG | Graphics | Simple SVG parser. |
| NanoVG | Graphics | 2D vector graphics rendering library us… |
| Nuklear | Graphics | Simple GUI library. |
| par_shapes | Graphics | Generator for parametric and other simp… |
| par_streamlines | Graphics | Triangulate wide lines and curves. |
| OpenVR | Graphics | An API runtime that allows access to VR… |
| Shaderc | Graphics | A collection of libraries for shader co… |
| SPIRV-Cross | Graphics | A library for performing reflection on… |
| OpenEXR | Graphics | A small, single-header library to load… |
| Tootle (AMD) | Graphics | A 3D triangle mesh optimization library… |
| Vulkan Memory Allocator | Graphics | An easy to integrate Vulkan memory allo… |
| Yoga | Graphics | An open-source, cross-platform layout l… |
| STB | STB | Lightweight single-file libraries for l… |
| Bullet Physics | Other | Real-time collision detection and multi… |
| CUDA | Other | A parallel computing platform and progr… |
| dyncall | Other | Library for dynamically calling C funct… |
| jemalloc | Other | Low-level memory management. |
| libffi | Other | A portable, high level programming inte… |
| libdivide | Other | A library that replaces expensive integ… |
| LLVM | Other | A collection of modular and reusable co… |
| LMDB | Other | Fast database library using memory-mapp… |
| LZ4 | Other | A lossless data compression algorithm t… |
| Meow Hash | Other | Fast non- cryptographic hash . |
| ODBC | Other | A C-language interface that makes it po… |
| Remotery | Other | Realtime CPU/GPU profiler . |
| rpmalloc | Other | Cross-platform thread caching memory al… |
| xxHash | Other | Fast hash algorithm . |
| Zstandard | Other | A fast lossless compression algorithm. |

| Binding | Notes |
|---|---|
| OpenGL | Most extensions are supported, but less… |
| OpenAL | ALC and other extensions are supported.… |
| dyncall | Set to be removed. |
| libffi | Replaces dyncall. |

Notable uses

β€’ Minecraft: Java Editioncite-ref-12[12]
β€’ Project Zomboidcite-ref-13[13]
β€’ Necesse

References

cite-note-lwjgl-1-0-11. citerefmatzon2007Matzon, Brian (4 February 2007). "LWJGL 1.0 Released". LWJGL Forum. Retrieved 23 July 2016.
cite-note-github-22. "LWJGL/lwjgl3". github.com. Retrieved 13 August 2016.
cite-note-doc-generator-33. "lwjgl3/doc – Generator". github.com. 11 August 2015. Retrieved 30 August 2015.
cite-note-website-44. "Official website". Retrieved 14 August 2015.
cite-note-welcome-to-lwjgl-3-55. ↑ citereftsakpinis2014Tsakpinis, Ioannis (13 November 2014). "Welcome to LWJGL 3". blog.lwjgl.org.
cite-note-roadmap-66. ↑ "LWJGL 3 Roadmap". github.com. Retrieved 2 June 2015.
cite-note-lwjgl-3-release-77. ↑ citereftsakpinis2015Tsakpinis, Ioannis (27 April 2015). "LWJGL 3.0.0a released". blog.lwjgl.org.
cite-note-88. ↑ "LWJGL 3.0.0 Released!". blog.lwjgl.org. 4 June 2016. Retrieved 4 June 2016.
cite-note-bindings-faq-99. ↑ "Bindings FAQ". github.com. 27 December 2014. Retrieved 27 July 2015.
cite-note-blog-3-1-0-released-1010. ↑ "LWJGL 3.1.0 Released!". blog.lwjgl.org. 30 October 2016. Retrieved 11 November 2016.
cite-note-1111. ↑ "Download – LWJGL". lwjgl.org. Retrieved 11 November 2016.
cite-note-1212. ↑ "Minecraft Attributions | Minecraft". Minecraft.net. Retrieved 9 July 2020.
cite-note-1313. ↑ "APZDTISA #3: This time with LIVE MULTIPLAYER!". Project Zomboid. 17 February 2014. Retrieved 25 January 2022.

External links

β€’ Official website